<!--底部 开始-->
<footer id="footer">
    <div class="container">
        <div class="row">
            <?php $pc_foot_nav = navigation('foot', $lang, 'pc'); ?>
            {foreach $pc_foot_nav as $oneRs}
                <div class="col-md-2 col-sm-4 col-4 d-none d-md-block">
                    <h4>{$oneRs.title|raw}</h4>
                    {notempty name="oneRs.subOne"}
                        <ul>
                            {volist name="oneRs.subOne" id="twoRs"}
                                <li><a href="{$twoRs.linkurl}" class="text-dark"><i class="fa fa-caret-right"></i> {$twoRs.title|raw}</a></li>
                            {/volist}
                        </ul>
                    {/notempty}
                </div>
            {/foreach}
            {if $controller eq 'index'}
                <div class="col-md-12 mt-3">
                    {:lang('v_friendlink')}：
                    <?php $friendList = ad(35, $lang, 'link'); ?>
                    {volist name="friendList" id="friendRs"}
                        <a href="{$friendRs.linkurl}" class="mr-3" target="_blank">{$friendRs.title}</a>
                    {/volist}
                    {if !empty($cityRs)}
                        <a href="/">{$siteRs.keyword}</a>
                    {/if}
                    <hr class="mt-2 mb-0">
                </div>
            {/if}
        </div>
    </div>
    <div class="footer-copyright mt-0">
        <div class="container">
            <div class="row py-3">
                <div class="col-md-7 col-sm-12 text-center text-sm-left">
                    Copyright &copy; {:date('Y')} {:request()->host(true)} ALL Rights Reserved.
                    {if in_array($lang,array('cn','apple'))}
                        {$siteRs.company} {:lang('v_copyright')}
                    {/if}
                </div>
                <div class="col-md-5 col-sm-12 text-lg-right text-center">
                    {if !empty($citySite) and in_array($lang,array($default_lang,'apple'))}
                        <a href="{:url('area/sitemap')}">{:lang('v_city_site')}</a>
                        <span class="mx-2">|</span>
                    {/if}
                    <a href="{:url('tags/sitemap')}">{:lang('v_sitemap')}</a>
                    <span class="mx-2">|</span>
                    <a href="/sitemap.xml" target="_blank">sitemap</a>
                    {if in_array($lang,array('cn','apple'))}
                        <span class="mx-2">|</span><a href="{$siteRs.icp_link}" rel="nofollow" target="_blank">{$siteRs.icp_number}</a>
                    {/if}
                </div>
            </div>
        </div>
    </div>
</footer>
<!-- 手机端底部 -->
<div class="w-100 d-block d-sm-none clearfix" style="height: 3rem;"></div>
<div class="w-100 d-block d-sm-none fixed-bottom bg-light border-top py-2 text-center" style="line-height: 16px; ">
    <div class="container">
        <div class="row">
            <?php $wap_foot_nav = navigation('foot', $lang, 'wap'); ?>
            {foreach $wap_foot_nav as $footRs}
                <div class="col-3">
                    <a href="{$footRs.linkurl}">
                        <div class="w-100">{$footRs.thumb|raw}</div>
                        <div class="w-100">{$footRs.title}</div>
                    </a>
                </div>
            {/foreach}
        </div>
    </div>
</div>
<!--底部  结束-->
<script src="{:config('template.skin')}/jquery/jquery-3.4.1.min.js" type="text/javascript"></script>
<script src="{:config('template.skin')}/bootstrap/js/popper.min.js" type="text/javascript"></script>
<script src="{:config('template.skin')}/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="{:config('template.skin')}/js/global.js"></script>
<!--客服 开始-->
<div id="top" class="{neq name="lang" value="cn"}d-none{/neq}">
    <div id="chat-id" class="chat-menu">
        <div class="chat-float"></div>
        {if !request()->isMobile()}
            <div class="kfbtn btn-qq text-center text-white">
                <i class="fab fa-qq fa-2x"></i>
                <span class="d-none d-md-block">QQ{:lang('v_chat')}</span>
                <div class="qq">
                    {volist name="chatList" id="chatRs"}
                        <a rel="nofollow" target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={$chatRs.account}&site=qq&menu=yes"><img src="{$chatRs.thumb}" alt="{$chatRs.title}" onerror="this.src='/skin/admin/img/nopic.png'" /><br />{$chatRs.title}</a>
                    {/volist}
                </div>
            </div>
            <div class="kfbtn btn-wx text-center text-white">
                <i class="fab fa-weixin fa-2x"></i>
                <span class="d-none d-md-block">{:lang('v_chat')}{:lang('v_wechat')}</span>
                <img class="pic" src="{$erweima}">
            </div>
            <div class="kfbtn btn-phone text-center text-white">
                <i class="fas fa-phone fa-2x"></i>
                <span class="d-none d-md-block">{:lang('v_consult')}{:lang('v_telephone')}</span>
                <div class="phone">{$telephone}</div>
            </div>
            <div class="kfbtn btn-top text-center text-white" style="display: none;">
                <i class="fas fa-chevron-up fa-2x"></i>
                <span class="d-none d-md-block">{:lang('v_goback')}{:lang('v_top')}</span>
            </div>
        {else /}
            {volist name="chatList" id="chatRs"}
                {if $key eq 0}
                    <a class="kfbtn btn-qq text-center text-white" rel="nofollow" target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin={$chatRs.account}&site=qq&menu=yes">
                        <i class="fab fa-qq fa-lg"></i>
                    </a>
                {/if}
            {/volist}
            <a rel="nofollow" href="tel:{$telephone}">
                <div class="kfbtn btn-phone text-center text-white">
                    <i class="fas fa-phone fa-lg"></i>
                </div>
            </a>
            <div class="kfbtn btn-top text-center text-white" style="display: none;">
                <i class="fas fa-chevron-up fa-lg"></i>
            </div>
        {/if}
    </div>
</div>
<!--客服 结束-->
<script type="text/javascript">
/*搜索*/
$("#keyword").focus(function(){
    $("#keyword").val('');
});
$('#btn_search').click(function(){
    if($('#keyword').val().length > 1){
        {if $action neq 'index'}
            $('#form_search').attr('action','<?php the_list_url($controller); ?>');
        {/if}
        $('#form_search').submit();
    }else{
        var html =  '<i class="fa fa-info-circle mr-2"></i>{:lang('v_keyword_tips')}';
        $('#modal_sm_tips').html(html);
        $("#modal_sm").modal("show");
        $('#keyword').focus();
        return false;
    }
});

//手机触摸滑动
var isTouch=('ontouchstart' in window);
if(isTouch){
    $(".carousel").on('touchstart', function(e){
        var that=$(this);
        var touch = e.originalEvent.changedTouches[0];
        var startX = touch.pageX;
        var startY = touch.pageY;
        $(document).on('touchmove',function(e){
            touch = e.originalEvent.touches[0] ||e.originalEvent.changedTouches[0];
            var endX=touch.pageX - startX;
            var endY=touch.pageY - startY;
            if(Math.abs(endY)<Math.abs(endX)){
                if(endX > 10){
                    $(this).off('touchmove');
                    that.carousel('prev');
                }else if (endX < -10){
                    $(this).off('touchmove');
                    that.carousel('next');
                }
                return false;
            }
        });
    });
    $(document).on('touchend',function(){
        $(this).off('touchmove');
    });
}

/* ajax提交表单
* form_id 表单ID
* btn_class 按钮class
* post_url 提交URL
* back_url 返回URL
*/
function do_ajax(form_id,btn_class,post_url,back_url){
    $.ajax({
        type: 'POST',
        url: post_url,
        dataType: 'json',
        data: $(form_id).serialize(),
        success: function(data){
            $('#modal_sm_tips').removeClass('text-success');
            $('#modal_sm_tips').removeClass('text-danger');
            switch(data.code){
                // 操作成功
                case 200:
                    $('#modal_sm_tips').addClass('text-success');
                    $('#modal_sm_tips').html('<i class="fas fa-check-circle mr-2"></i>' + data.msg);
                    break;
                // 操作失败
                default:
                    $('#modal_sm_tips').addClass('text-danger');
                    $('#modal_sm_tips').html('<i class="fas fa-info-circle mr-2"></i>' + data.msg);
                    $('#img_verify').attr('src','/captcha/?randid='+Math.floor(Math.random()*100));
            }
            $('#modal_sm').modal('show');
            window.setTimeout(function () {
                $('#modal_sm').modal('hide');
                if (data.code == 200) {
                    $('#modal').modal('hide');
                }
            }, 2000);
        },
    });
}
</script>
<!-- 弹框共用提示：小/固定 -->
<div class="modal" id="modal_sm">
    <div class="modal-dialog modal-sm">
        <div class="modal-content" id="modal_sm_content">
            <div class="modal-header">
                <span class="modal-title pt-1" id="modal_sm_title"><i class="fas fa-info-circle mr-1"></i>{:lang('v_do_tips')}</span>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body py-3 text-center text-success h6 mb-0" id="modal_sm_tips">
            </div>
        </div>
    </div>
</div>
<!-- ajax共用提示：中 -->
<div class="modal" id="modal">
    <div class="modal-dialog">
        <div class="modal-content" id="modal_content"></div>
    </div>
</div>
{notempty name="siteRs.htmlcode"}{$siteRs.htmlcode|raw}{/notempty}